#include "stdinc.h"
#include "CmdList.h"

#include "platform/Window.h"


bool vid_width(int flags, CCmdList::Parser* parser)
{
	float w;

	if (parser->EndCmd())
	{
		LOG->Console("Video width: %f", WINDOW->GetWidth());
		return true;
	}

	if (!parser->GetNumber(w))
		return false;

	WINDOW->SetWidth((int)w);
	return true;
}

bool vid_height(int flags, CCmdList::Parser* parser)
{
	float h;

	if (parser->EndCmd())
	{
		LOG->Console("Video height: %f", WINDOW->GetHeight());
		return true;
	}

	if (!parser->GetNumber(h))
		return false;

	WINDOW->SetHeight((int)h);
	return true;
}

bool vid_bpp(int flags, CCmdList::Parser* parser)
{
	return false;
}

bool vid_fullscreen(int flags, CCmdList::Parser* parser)
{
	return false;
}

bool vid_sshot(int flags, CCmdList::Parser* parser)
{
	return false;
}

CCmdList::TCmdStruct cmds_main[] = {
	{"vid_width",              vid_width},
	{"vid_height",             vid_height},
	{"vid_bpp",                vid_bpp},
	{"vid_fullscreen",         vid_fullscreen},
	{"vid_sshot",              vid_sshot},
	{NULL,NULL}
};

CCmdList::TCmdStruct* GetCmds_Main()
{
	return cmds_main;
}

